<?php
include_once("init.php");

if ($session->access)
{
	switch ($session->type)
	{
		case 2:header("Location: ".$home_url."for_student");break;
		case 4:header("Location: ".$home_url."for_teacher");break;
		case 8:header("Location: ".$home_url."for_admin");break;
		default: header("Location: ".$home_url."login");
	}
}
else
{
	header("Location: ".$home_url."login");
}
?>